﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SewerAPI.Core;

namespace SewerAPI.Security
{
    /// <summary>
    /// Encryption interface
    /// </summary>
    public interface IEncryptionEngine
    {
        /// <summary>
        /// Get the encryption name
        /// </summary>
        /// <returns></returns>
        string GetEncryptionName();

        /// <summary>
        /// Decrypt a message
        /// </summary>
        /// <param name="encrypted"></param>
        /// <returns></returns>
        Message DecryptMessage(byte[] encryptedmessage);

        /// <summary>
        /// Decrypt the channel from an encrypted message
        /// </summary>
        /// <param name="encryptedmessage"></param>
        /// <returns></returns>
        string DecryptChannel(byte[] encryptedmessage);

        /// <summary>
        /// Encrypt a message
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        byte[] EncryptMessage(Message m);

        /// <summary>
        /// Encrypt a channel name
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        byte[] EncryptChannel(Message m);
    }
}
